package cn.dengta.webapp.user.vo;

import cn.dengta.common.model.Messager;
import cn.dengta.webapp.base.vo.AbstractVO;
import lombok.Getter;
import lombok.Setter;
import me.codeplayer.util.NumberUtil;

@Getter
@Setter
public class LikeMeUnreadVO extends AbstractVO<Void> {

	/** 粉丝未读数 */
	public Integer followedCount;
	/** 访客未读数 */
	public Integer visitedCount;
	/** 总未读数 */
	public Integer totalCount;

	public static LikeMeUnreadVO of(Integer followedUnreadCount, Integer visitedUnreadCount) {
		LikeMeUnreadVO vo = new LikeMeUnreadVO();
		extracted(followedUnreadCount, visitedUnreadCount, vo);
		return vo;
	}

	private static void extracted(Integer followedUnreadCount, Integer visitedUnreadCount, LikeMeUnreadVO vo) {
		vo.followedCount = followedUnreadCount;
		vo.visitedCount = visitedUnreadCount;
		vo.totalCount = NumberUtil.getInt(followedUnreadCount, 0) + NumberUtil.getInt(visitedUnreadCount, 0);
	}

}
